package com.hclc.impl.job;

import com.hclc.config.aop.joblog.annotation.JobExecuteRecord;
import com.hclc.api.job.BaseJob;
import com.hclc.config.aop.joblog.JobLogUtil;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.stereotype.Component;

/**
 * @Author: hef
 * @Date: Create in 2:43 下午 2020/11/12
 */
@Component
public class TestJob implements BaseJob {

    @JobExecuteRecord
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        JobLogUtil.saveLog("任务开始:{}", "哈哈哈");
        throw new RuntimeException("发生异常拉");
//        JobLogUtil.saveLog("任务结束:{}", "123");
    }
}
